\(\int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx\) [178]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 79 \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {a i x}{d f}-\frac {b i x}{d f}+\frac {b i (e+f x) \log (c (e+f x))}{d f^2}+\frac {(f h-e i) (a+b \log (c (e+f x)))^2}{2 b d f^2} \]

[Out]

a*i*x/d/f-b*i*x/d/f+b*i*(f*x+e)*ln(c*(f*x+e))/d/f^2+1/2*(-e*i+f*h)*(a+b*ln(c*(f*x+e)))^2/b/d/f^2

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {2458, 12, 2388, 2338, 2332} \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {(f h-e i) (a+b \log (c (e+f x)))^2}{2 b d f^2}+\frac {a i x}{d f}+\frac {b i (e+f x) \log (c (e+f x))}{d f^2}-\frac {b i x}{d f} \]

[In]

Int[((h + i*x)*(a + b*Log[c*(e + f*x)]))/(d*e + d*f*x),x]

[Out]

(a*i*x)/(d*f) - (b*i*x)/(d*f) + (b*i*(e + f*x)*Log[c*(e + f*x)])/(d*f^2) + ((f*h - e*i)*(a + b*Log[c*(e + f*x)
])^2)/(2*b*d*f^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2388

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[(d
+ e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x), x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (\frac {f h-e i}{f}+\frac {i x}{f}\right ) (a+b \log (c x))}{d x} \, dx,x,e+f x\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {\left (\frac {f h-e i}{f}+\frac {i x}{f}\right ) (a+b \log (c x))}{x} \, dx,x,e+f x\right )}{d f} \\ & = \frac {i \text {Subst}(\int (a+b \log (c x)) \, dx,x,e+f x)}{d f^2}+\frac {(f h-e i) \text {Subst}\left (\int \frac {a+b \log (c x)}{x} \, dx,x,e+f x\right )}{d f^2} \\ & = \frac {a i x}{d f}+\frac {(f h-e i) (a+b \log (c (e+f x)))^2}{2 b d f^2}+\frac {(b i) \text {Subst}(\int \log (c x) \, dx,x,e+f x)}{d f^2} \\ & = \frac {a i x}{d f}-\frac {b i x}{d f}+\frac {b i (e+f x) \log (c (e+f x))}{d f^2}+\frac {(f h-e i) (a+b \log (c (e+f x)))^2}{2 b d f^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.84 \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {2 a f i x-2 b f i x+2 b i (e+f x) \log (c (e+f x))+\frac {(f h-e i) (a+b \log (c (e+f x)))^2}{b}}{2 d f^2} \]

[In]

Integrate[((h + i*x)*(a + b*Log[c*(e + f*x)]))/(d*e + d*f*x),x]

[Out]

(2*a*f*i*x - 2*b*f*i*x + 2*b*i*(e + f*x)*Log[c*(e + f*x)] + ((f*h - e*i)*(a + b*Log[c*(e + f*x)])^2)/b)/(2*d*f
^2)

Maple [A] (verified)

Time = 0.57 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.16

method result size
norman \(\frac {i \left (a -b \right ) x}{d f}+\frac {b i x \ln \left (c \left (f x +e \right )\right )}{d f}-\frac {\left (a e i -a f h -b e i \right ) \ln \left (c \left (f x +e \right )\right )}{d \,f^{2}}-\frac {b \left (e i -f h \right ) \ln \left (c \left (f x +e \right )\right )^{2}}{2 d \,f^{2}}\) \(92\)
parts \(\frac {a \left (\frac {x i}{f}+\frac {\left (-e i +f h \right ) \ln \left (f x +e \right )}{f^{2}}\right )}{d}+\frac {b \left (-\frac {c e i \ln \left (c f x +c e \right )^{2}}{2 f}+\frac {c h \ln \left (c f x +c e \right )^{2}}{2}+\frac {i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f}\right )}{d c f}\) \(111\)
parallelrisch \(\frac {2 x \ln \left (c \left (f x +e \right )\right ) b \,e^{2} f i -\ln \left (c \left (f x +e \right )\right )^{2} b \,e^{3} i +\ln \left (c \left (f x +e \right )\right )^{2} b \,e^{2} f h +2 x a \,e^{2} f i -2 x b \,e^{2} f i -2 \ln \left (c \left (f x +e \right )\right ) a \,e^{3} i +2 \ln \left (c \left (f x +e \right )\right ) a \,e^{2} f h +2 \ln \left (c \left (f x +e \right )\right ) b \,e^{3} i}{2 d \,e^{2} f^{2}}\) \(128\)
risch \(-\frac {b \ln \left (c \left (f x +e \right )\right )^{2} e i}{2 d \,f^{2}}+\frac {b \ln \left (c \left (f x +e \right )\right )^{2} h}{2 d f}+\frac {b i x \ln \left (c \left (f x +e \right )\right )}{d f}-\frac {\ln \left (f x +e \right ) a e i}{d \,f^{2}}+\frac {\ln \left (f x +e \right ) a h}{d f}+\frac {\ln \left (f x +e \right ) b e i}{d \,f^{2}}+\frac {a i x}{d f}-\frac {b i x}{d f}\) \(130\)
derivativedivides \(\frac {-\frac {a c e i \ln \left (c f x +c e \right )}{f d}+\frac {a h c \ln \left (c f x +c e \right )}{d}+\frac {a i \left (c f x +c e \right )}{f d}-\frac {b c e i \ln \left (c f x +c e \right )^{2}}{2 f d}+\frac {b h c \ln \left (c f x +c e \right )^{2}}{2 d}+\frac {b i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}}{c f}\) \(142\)
default \(\frac {-\frac {a c e i \ln \left (c f x +c e \right )}{f d}+\frac {a h c \ln \left (c f x +c e \right )}{d}+\frac {a i \left (c f x +c e \right )}{f d}-\frac {b c e i \ln \left (c f x +c e \right )^{2}}{2 f d}+\frac {b h c \ln \left (c f x +c e \right )^{2}}{2 d}+\frac {b i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}}{c f}\) \(142\)

[In]

int((i*x+h)*(a+b*ln(c*(f*x+e)))/(d*f*x+d*e),x,method=_RETURNVERBOSE)

[Out]

i*(a-b)/d/f*x+b*i*x/d/f*ln(c*(f*x+e))-(a*e*i-a*f*h-b*e*i)/d/f^2*ln(c*(f*x+e))-1/2*b*(e*i-f*h)/d/f^2*ln(c*(f*x+
e))^2

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.90 \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {2 \, {\left (a - b\right )} f i x + {\left (b f h - b e i\right )} \log \left (c f x + c e\right )^{2} + 2 \, {\left (b f i x + a f h - {\left (a - b\right )} e i\right )} \log \left (c f x + c e\right )}{2 \, d f^{2}} \]

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="fricas")

[Out]

1/2*(2*(a - b)*f*i*x + (b*f*h - b*e*i)*log(c*f*x + c*e)^2 + 2*(b*f*i*x + a*f*h - (a - b)*e*i)*log(c*f*x + c*e)
)/(d*f^2)

Sympy [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.08 \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {b i x \log {\left (c \left (e + f x\right ) \right )}}{d f} + x \left (\frac {a i}{d f} - \frac {b i}{d f}\right ) + \frac {\left (- b e i + b f h\right ) \log {\left (c \left (e + f x\right ) \right )}^{2}}{2 d f^{2}} - \frac {\left (a e i - a f h - b e i\right ) \log {\left (e + f x \right )}}{d f^{2}} \]

[In]

integrate((i*x+h)*(a+b*ln(c*(f*x+e)))/(d*f*x+d*e),x)

[Out]

b*i*x*log(c*(e + f*x))/(d*f) + x*(a*i/(d*f) - b*i/(d*f)) + (-b*e*i + b*f*h)*log(c*(e + f*x))**2/(2*d*f**2) - (
a*e*i - a*f*h - b*e*i)*log(e + f*x)/(d*f**2)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (77) = 154\).

Time = 0.23 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.54 \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=b i {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} \log \left (c f x + c e\right ) - \frac {1}{2} \, b h {\left (\frac {2 \, \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac {\log \left (f x + e\right )^{2} + 2 \, \log \left (f x + e\right ) \log \left (c\right )}{d f}\right )} + a i {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} + \frac {b h \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} + \frac {a h \log \left (d f x + d e\right )}{d f} + \frac {{\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} b i}{2 \, d f^{2}} \]

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="maxima")

[Out]

b*i*(x/(d*f) - e*log(f*x + e)/(d*f^2))*log(c*f*x + c*e) - 1/2*b*h*(2*log(c*f*x + c*e)*log(d*f*x + d*e)/(d*f) -
 (log(f*x + e)^2 + 2*log(f*x + e)*log(c))/(d*f)) + a*i*(x/(d*f) - e*log(f*x + e)/(d*f^2)) + b*h*log(c*f*x + c*
e)*log(d*f*x + d*e)/(d*f) + a*h*log(d*f*x + d*e)/(d*f) + 1/2*(e*log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*b*i
/(d*f^2)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.16 \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {b i x \log \left (c f x + c e\right )}{d f} + \frac {{\left (a i - b i\right )} x}{d f} + \frac {{\left (b f h - b e i\right )} \log \left (c f x + c e\right )^{2}}{2 \, d f^{2}} + \frac {{\left (a f h - a e i + b e i\right )} \log \left (f x + e\right )}{d f^{2}} \]

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="giac")

[Out]

b*i*x*log(c*f*x + c*e)/(d*f) + (a*i - b*i)*x/(d*f) + 1/2*(b*f*h - b*e*i)*log(c*f*x + c*e)^2/(d*f^2) + (a*f*h -
 a*e*i + b*e*i)*log(f*x + e)/(d*f^2)

Mupad [B] (verification not implemented)

Time = 1.75 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.27 \[ \int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {2\,a\,f\,i\,x-2\,b\,f\,i\,x-b\,e\,i\,{\ln \left (c\,e+c\,f\,x\right )}^2+b\,f\,h\,{\ln \left (c\,e+c\,f\,x\right )}^2-2\,a\,e\,i\,\ln \left (e+f\,x\right )+2\,a\,f\,h\,\ln \left (e+f\,x\right )+2\,b\,e\,i\,\ln \left (e+f\,x\right )+2\,b\,f\,i\,x\,\ln \left (c\,e+c\,f\,x\right )}{2\,d\,f^2} \]

[In]

int(((h + i*x)*(a + b*log(c*(e + f*x))))/(d*e + d*f*x),x)

[Out]

(2*a*f*i*x - 2*b*f*i*x - b*e*i*log(c*e + c*f*x)^2 + b*f*h*log(c*e + c*f*x)^2 - 2*a*e*i*log(e + f*x) + 2*a*f*h*
log(e + f*x) + 2*b*e*i*log(e + f*x) + 2*b*f*i*x*log(c*e + c*f*x))/(2*d*f^2)